<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
  xmlns:c="livcos.org/ns/cosmos"
  xmlns:f="livcos.org/ns/xslt/function"
  xmlns="http://www.w3.org/1999/xhtml"
  exclude-result-prefixes="c f">
  
  <xsl:import href="style/config.xsl"/>
  
  <xsl:variable name="default_object" select="$config/cosmos/default-object/@ref"/>
  <xsl:param name="uri" select="concat(substring($default_object, 2), '.html')"/>
  
	<xsl:output method="html" encoding="UTF-8"
		doctype-public="-//W3C//DTD HTML 4.01//EN"
		doctype-system="http://www.w3.org/TR/html4/strict.dtd"/>

	<xsl:template match="/">
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <title>LivCos</title>
        <script type="text/javascript">
          <xsl:comment>
            location.replace("<xsl:value-of select="$uri"/>");
          </xsl:comment>
        </script>
      </head>
      <body>
        <h1>LivCos</h1>
        <p>
          Redirecting to <a href="{$uri}"><xsl:value-of select="$uri"/></a>...
        </p>
        <p style="font-weight: bold; color: red;">
          In order to use the LivCos Web interface you need to enable JavaScript!
        </p>
      </body>
    </html>
  </xsl:template>
  
</xsl:stylesheet>
